//
//  String+Category.swift
//  zob
//
//  Created by A-Jay on 31/3/2017.
//  Copyright © 2017年 A-Jay. All rights reserved.
//

import Foundation
/**
 *  关于字符串
 */
extension NSString {

    
    /**
     *  现在时间转化成字符串
     */
    class func dateNowAsString() -> String {
        
        let nowDate = Date()
        let timeZone = TimeZone.init(identifier: "UTC")
        let formatter = DateFormatter()
        formatter.timeZone = timeZone
        formatter.locale = Locale.init(identifier: "zh_CN")
        formatter.dateFormat = "yyyy-MM-dd HH:mm"
        
        let date = formatter.string(from: nowDate)
        return date.components(separatedBy: " ").first!
    } 
    
}
